﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Dynamic;
using System.Linq;
using System.Web;
using Serenity.Libra.Web.ViewModels;

namespace Serenity.Libra.Web.ViewModels
{
    public class DetailViewModel
    {
        public DataSourceModel dataSource { get; set; }

        public object form { get; set; }

        public string mode { get; set; }

        public Dictionary<string, object> Parameters { get; set; }

        public DetailViewModel()
        {
            this.dataSource = new DataSourceModel();
            this.form = (object)new ExpandoObject();
            this.mode = "new";
            this.Parameters = new Dictionary<string, object>();
        }
    }
    public enum DetailPageMode
    {
        [Description("新增")]
        New,
        [Description("编辑")]
        Edit,
        [Description("查看")]
        View
    }
}